
# 4题
# a = float(input('请输入一个数字:'))
# b = float(input('请输入一个数字:'))
# ret = a + b
# print(ret)

# 5题
print('==================================')
print('=        欢迎进入到身份认证系统V1.0')
print('= 1. 登录')
print('= 2. 退出')
print('= 3. 认证')
print('= 4. 修改密码')
print('==================================')

# 6题
# name = input('请输入姓名:')
# QQ = input('请输入QQ号:')
# phone = input('请输入手机号:')
# add = input('请输入公司地址:')
# print(name, QQ, phone, add)
# print('==================================')
# print('姓名：%s\nQQ：%s\n手机号：%s\n公司地址：%s' % (name, QQ, phone, add))
# print('==================================')

# 7题
# user = input('请输入用户名:')
# pw = input('请输入密码:')
# if user == 'lebo':
#     if pw == '123456':
#         print('欢迎进入%s的世界！' % user)
#     else:print('密码错误!')
# else:print('用户名错误!')

# 8题
import random
guess_list = ["石头", "剪刀", "布"]
rule = [["布", "石头"], ["石头", "剪刀"], ["剪刀", "布"]]

while True:
    # 方法返回一个列表，元组或字符串的随机项。
    computer = random.choice(guess_list)
    people = input('请输入：石头,剪刀,布：\n')

    if people not in guess_list:
        people = input('重新请输入：石头,剪刀,布：\n')

        continue
    if computer == people:
        print("平手，再玩一次！")

    elif [computer, people] in rule:
        print("电脑获胜！")
    else:
        print("人获胜！")
        break




